package dev.ece.util.tools;

import org.lwjgl.opengl.GL11;

/**
 * @author 潜行的青衣
 * @see
 */
public class Screen {

	private int x;
	
	private int y;
	
	private int width;
	
	private int height;
	
	public Screen(int x, int y, int width, int height) {
		this.x = x;
		this.y = y;
		this.width = width;
		this.height = height;
	}
	
	public Screen(int width, int height) {
		this.width = width;
		this.height = height;
	}

	public void glViewPort() {
		//设置OpenGL场景的大小
		GL11.glViewport(x, y, width, height);
	}
	
	public int[] toViewArray() {
		return new int[]{x, y, width, height};
	}
	
	public int getX() {
		return x;
	}

	public int getY() {
		return y;
	}

	public int getWidth() {
		return width;
	}

	public int getHeight() {
		return height;
	}
	
}
